<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="/view/common/head.jsp" %>
    <link rel="stylesheet" href="static/css/manager.css">
    <link rel="stylesheet" href="static/css/book_add.css">
    <title>图书添加页面</title>

</head>
<body>
<div class="header">
    <div class="top">
        <div class="left_top">
            <img src="static/image/logo.jpeg" alt="">
            <span>图书管理系统</span>
        </div>
        <%@ include file="/view/common/manager_menu.jsp" %>
    </div>
</div>
<div class="main">
    <form action="manager/bookServlet" method="post">
        <table class="show_body">
            <thead>
            <tr>
                <th>名称</th>
                <th>价格</th>
                <th>作者</th>
                <th>销量</th>
                <th>库存</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <input type="hidden" name="pageNo" value="${param.pageNo}">
                <input type="hidden" name="action" value="${requestScope.book == null?"add":"update"}" readonly>
                <input type="hidden" name="id" value="${requestScope.book.id}">
                <td><input type="text" name="name" placeholder="请输入书名" value="${requestScope.book.name}"></td>
                <td><input type="text" name="price" placeholder="请输入价格" value="${requestScope.book.price}"></td>
                <td><input type="text" name="author" placeholder="请输入作者" value="${requestScope.book.author}"></td>
                <td><input type="text" name="sales" placeholder="请输入销量" value="${requestScope.book.sales}"></td>
                <td><input type="text" name="stock" placeholder="请输入库存" value="${requestScope.book.stock}"></td>
                <td class="handle">
                    <button>提交</button>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<%@include file="/view/common/footer.jsp" %>
</body>
</html>
